library(tidyverse)

insecure = c(8.5, 8.5, 8.5, 17.9, 17.9, 17.9)
pantries = c(0, 17, 56, 0, 17, 56)
boxes_est = c(20077.115777, 20895.367418, 21249.556375, 
              30842.665141, 60216.492384, 79795.184879)
boxes_se = c(3414.629698, 2120.843933, 2815.005884, 
             6343.872009, 5885.604074, 9312.932019)
boxes_dta = data.frame(insecure, pantries, boxes_est, boxes_se)

## Plot
boxes = boxes_dta %>%
  ggplot(., aes(factor(insecure), boxes_est, fill = factor(pantries))) +
  geom_bar(position = "dodge", stat = "identity") +
  geom_errorbar( aes( ymin=boxes_est - 1.96 * boxes_se, 
                      ymax=boxes_est + 1.96 * boxes_se), width=0.4, 
                 position = position_dodge(0.9), colour="black", alpha=0.9, size=1) +
  scale_fill_manual(values=c("#c6dbef", "#6baed6", "#08519c"), name = "Food Pantries Per Capita",
                    labels = c("0", "17", "56")) +
  scale_x_discrete(labels = c("8.5%", "17.9%")) +
  labs(y = "Predicted Food Boxes Per Capita", x = "% Food Insecure") +
  theme_bw() +
  theme(panel.grid.major = element_blank(), 
        panel.grid.minor = element_blank(),
        panel.background = element_rect(colour = "black"),
        legend.position = "bottom")